﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <title>Ping: com.stateforge.statemachine.examples.ping.PingTest Class Reference</title>
    <link href="/Content/Help.css" rel="stylesheet" type="text/css" />
    <link href="/Content/css/tabs.css" rel="stylesheet" type="text/css" />
    <link href="/Content/css/doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div id="header">
        <img id="logo" alt="StateForge" src="/Content/Images/StateForgeLogo.png" />
        <div id="title">
            <h1>
                Examples using state machines generated by StateBuilderJava
            </h1>
            <h3>
                Ping: com.stateforge.statemachine.examples.ping.PingTest Class Reference
            </h3>
        </div>
        <div id="menucontainer">
            <ul id="menu">
                <li><a href="/">Home</a></li>
                <li><a href="/Home/Download">Downloads</a></li>
                <li><a href="/Help/state-machine-tools.aspx">Help</a></li>
                <li><a href="/Home/Faq">F.A.Q</a></li>
                <li><a href="/Home/About">Contact us</a></li>
            </ul>
        </div>
    </div>
<!-- Generated by Doxygen 1.7.4 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Packages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespacecom.html">com</a>      </li>
      <li class="navelem"><a class="el" href="namespacecom_1_1stateforge.html">stateforge</a>      </li>
      <li class="navelem"><a class="el" href="namespacecom_1_1stateforge_1_1statemachine.html">statemachine</a>      </li>
      <li class="navelem"><a class="el" href="namespacecom_1_1stateforge_1_1statemachine_1_1examples.html">examples</a>      </li>
      <li class="navelem"><a class="el" href="namespacecom_1_1stateforge_1_1statemachine_1_1examples_1_1ping.html">ping</a>      </li>
      <li class="navelem"><a class="el" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1ping_1_1_ping_test.html">PingTest</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pac-attribs">Package Attributes</a> &#124;
<a href="#pri-attribs">Private Attributes</a>  </div>
  <div class="headertitle">
<div class="title">com.stateforge.statemachine.examples.ping.PingTest Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="com::stateforge::statemachine::examples::ping::PingTest" -->
<p><a href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1ping_1_1_ping_test-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1ping_1_1_ping_test.html#a916afd163b145466ee5d18382031dc1e">setUp</a> ()  throws Exception </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1ping_1_1_ping_test.html#ae0e186bb92b2bb62469509646158f1f4">tearDown</a> ()  throws Exception </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1ping_1_1_ping_test.html#affd7b4aa52c33ae5b9b27a613b06452f">testStart</a> ()</td></tr>
<tr><td colspan="2"><h2><a name="pac-attribs"></a>
Package Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">CountDownLatch&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1ping_1_1_ping_test.html#addc0f97d2883db8acdfb41ce7a96f5c1">countDownLatch</a> = new CountDownLatch(1)</td></tr>
<tr><td colspan="2"><h2><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1ping_1_1_echo_server.html">EchoServer</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1ping_1_1_ping_test.html#a2acdf6442e35aee2abfc1d0b95bb48ec">server</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1ping_1_1_ping.html">Ping</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1ping_1_1_ping_test.html#a2db481cab3a51d38b1baa3379d2008d0">ping</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Unit test for <a class="el" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1ping_1_1_ping.html">Ping</a> </p>

<p>Definition at line <a class="el" href="_ping_test_8java_source.html#l00014">14</a> of file <a class="el" href="_ping_test_8java_source.html">PingTest.java</a>.</p>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a916afd163b145466ee5d18382031dc1e"></a><!-- doxytag: member="com::stateforge::statemachine::examples::ping::PingTest::setUp" ref="a916afd163b145466ee5d18382031dc1e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void com.stateforge.statemachine.examples.ping.PingTest.setUp </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td>  throws Exception </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_ping_test_8java_source.html#l00021">21</a> of file <a class="el" href="_ping_test_8java_source.html">PingTest.java</a>.</p>
<div class="fragment"><pre class="fragment">                                         {
        this.<a class="code" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1ping_1_1_ping_test.html#a2acdf6442e35aee2abfc1d0b95bb48ec">server</a> = <span class="keyword">new</span> EchoServer();
        this.<a class="code" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1ping_1_1_ping_test.html#a2acdf6442e35aee2abfc1d0b95bb48ec">server</a>.start();
        this.<a class="code" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1ping_1_1_ping_test.html#a2db481cab3a51d38b1baa3379d2008d0">ping</a> = <span class="keyword">new</span> Ping(<span class="keyword">new</span> IPingListener() {
            <span class="keyword">public</span> <span class="keywordtype">void</span> end() {
                <a class="code" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1ping_1_1_ping_test.html#addc0f97d2883db8acdfb41ce7a96f5c1">countDownLatch</a>.countDown();
            }
        });
    }
</pre></div>
</div>
</div>
<a class="anchor" id="ae0e186bb92b2bb62469509646158f1f4"></a><!-- doxytag: member="com::stateforge::statemachine::examples::ping::PingTest::tearDown" ref="ae0e186bb92b2bb62469509646158f1f4" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void com.stateforge.statemachine.examples.ping.PingTest.tearDown </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td>  throws Exception </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_ping_test_8java_source.html#l00032">32</a> of file <a class="el" href="_ping_test_8java_source.html">PingTest.java</a>.</p>
<div class="fragment"><pre class="fragment">                                            {
        <span class="comment">//this.server.stop();</span>
    } 
</pre></div>
</div>
</div>
<a class="anchor" id="affd7b4aa52c33ae5b9b27a613b06452f"></a><!-- doxytag: member="com::stateforge::statemachine::examples::ping::PingTest::testStart" ref="affd7b4aa52c33ae5b9b27a613b06452f" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void com.stateforge.statemachine.examples.ping.PingTest.testStart </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_ping_test_8java_source.html#l00037">37</a> of file <a class="el" href="_ping_test_8java_source.html">PingTest.java</a>.</p>
<div class="fragment"><pre class="fragment">    {
        this.<a class="code" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1ping_1_1_ping_test.html#a2db481cab3a51d38b1baa3379d2008d0">ping</a>.start();
        <span class="keywordflow">try</span> {
            this.<a class="code" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1ping_1_1_ping_test.html#addc0f97d2883db8acdfb41ce7a96f5c1">countDownLatch</a>.await();
        } <span class="keywordflow">catch</span> (InterruptedException e) {
            e.printStackTrace();
            junit.framework.Assert.assertTrue(<span class="keyword">false</span>);
        }
    }
</pre></div>
</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="addc0f97d2883db8acdfb41ce7a96f5c1"></a><!-- doxytag: member="com::stateforge::statemachine::examples::ping::PingTest::countDownLatch" ref="addc0f97d2883db8acdfb41ce7a96f5c1" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CountDownLatch <a class="el" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1ping_1_1_ping_test.html#addc0f97d2883db8acdfb41ce7a96f5c1">com.stateforge.statemachine.examples.ping.PingTest.countDownLatch</a> = new CountDownLatch(1)<code> [package]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_ping_test_8java_source.html#l00018">18</a> of file <a class="el" href="_ping_test_8java_source.html">PingTest.java</a>.</p>

</div>
</div>
<a class="anchor" id="a2db481cab3a51d38b1baa3379d2008d0"></a><!-- doxytag: member="com::stateforge::statemachine::examples::ping::PingTest::ping" ref="a2db481cab3a51d38b1baa3379d2008d0" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1ping_1_1_ping.html">Ping</a> <a class="el" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1ping_1_1_ping_test.html#a2db481cab3a51d38b1baa3379d2008d0">com.stateforge.statemachine.examples.ping.PingTest.ping</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_ping_test_8java_source.html#l00017">17</a> of file <a class="el" href="_ping_test_8java_source.html">PingTest.java</a>.</p>

</div>
</div>
<a class="anchor" id="a2acdf6442e35aee2abfc1d0b95bb48ec"></a><!-- doxytag: member="com::stateforge::statemachine::examples::ping::PingTest::server" ref="a2acdf6442e35aee2abfc1d0b95bb48ec" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1ping_1_1_echo_server.html">EchoServer</a> <a class="el" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1ping_1_1_ping_test.html#a2acdf6442e35aee2abfc1d0b95bb48ec">com.stateforge.statemachine.examples.ping.PingTest.server</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_ping_test_8java_source.html#l00016">16</a> of file <a class="el" href="_ping_test_8java_source.html">PingTest.java</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/test/java/com/stateforge/statemachine/examples/ping/<a class="el" href="_ping_test_8java_source.html">PingTest.java</a></li>
</ul>
</div>
﻿<div id="footer">
    <hr />
    <p>
        Copyright &copy; 2011 StateForge.</p>
    <hr />
</div>
</body> </html> 
